package com.xms.logging.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xms.core.data.Entity;
import com.xms.logging.entity.EntityLog;
import com.xms.schema.entity.Attribute;
import com.xms.sdk.core.OwnerObject;

import java.util.List;
import java.util.UUID;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author migo
 * @since 2021-08-29
 */
public interface IEntityLogService extends IService<EntityLog> {

    boolean createdLog(Entity data, com.xms.schema.entity.Entity entityMetadata, List<Attribute> attributeMetadatas);

    boolean updatedLog(Entity originData, Entity newData, com.xms.schema.entity.Entity entityMetadata, List<Attribute> attributeMetadatas);

    boolean deletedLog(Entity data, com.xms.schema.entity.Entity entityMetadata, List<Attribute> attributeMetadatas);

    boolean sharedLog(Entity data, com.xms.schema.entity.Entity entityMetadata);

    boolean assignedLog(Entity data, OwnerObject from, OwnerObject to, com.xms.schema.entity.Entity entityMetadata);

    boolean mergedLog(Entity merged, Entity target, com.xms.schema.entity.Entity entityMetadata, List<Attribute> attributeMetadatas);

    void clear();

    void clear(UUID entityId);
}
